package Week2.J0424;

import java.util.Scanner;

public class 添加逗号 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String num = scanner.next();
        int len = num.length();
        int count = 0;
        StringBuffer sbr = new StringBuffer();
        for (int i = len-1; i >= 0; i--) {
            char tmp = num.charAt(i);
            sbr.append(tmp);
            count++;
            if (count == 3 && i != 0) {
                sbr.append(",");
                count = 0;
            }
        }
        System.out.println(sbr.reverse().toString());
    }
}
